<?php echo $this->fetch('header.html'); ?>
<script type="text/javascript">
$(function(){
    $('#add_time_from').datepicker({dateFormat: 'yy-mm-dd',changeMonth: true, changeYear: true,timeFormat: 'hh:mm:ss'});
    $('#add_time_to').datepicker({dateFormat: 'yy-mm-dd',changeMonth: true, changeYear: true});
	$('.checkitem').attr('checked', false);//用于删除时返回复选框全部取消
});
</script>
<div id="rightTop">
  <ul class="subnav">
      <li><a class="btn0" href="index.php?app=kd_wuliu">物流列表</a></li>
      <li><a class="btn1" href="index.php?app=kd_wuliu&act=addwuliu">添加物流</a></li>
  </ul>
</div>
<div class="mrightTop">
    <div class="fontl">
<form method="get">
 <div class="left">
    <input type="hidden" name="app" value="kd_wuliu" />
    关键词:<input class="queryInput" type="text" name="key" value="<?php echo htmlspecialchars($_GET['key']); ?>" style="width:200px" placeholder="运单号/订单编号"/>
    添加时间：<input type="text" value="<?php echo $_GET['add_time_from']; ?>" id="add_time_from" name="add_time_from" class="pick_date" /> 至
    <input type="text" value="<?php echo $_GET['add_time_to']; ?>" id="add_time_to" name="add_time_to" class="pick_date" />
    <select name="pagenum">
      <option value="20" <?php if ($_GET['pagenum'] == 20): ?>selected<?php endif; ?>>每页20条</option>
      <option value="50" <?php if ($_GET['pagenum'] == 50): ?>selected<?php endif; ?>>每页50条</option>
      <option value="100" <?php if ($_GET['pagenum'] == 100): ?>selected<?php endif; ?>>每页100条</option>
      <option value="150" <?php if ($_GET['pagenum'] == 150): ?>selected<?php endif; ?>>每页150条</option>
      <option value="200" <?php if ($_GET['pagenum'] == 200): ?>selected<?php endif; ?>>每页200条</option>
   </select>
    <input type="submit" class="formbtn" value="查询" />
</div>
</form>
    </div>
    <div class="fontr"><?php echo $this->fetch('page.top.html'); ?></div>
</div>

<div class="tdare">
<form method=get>
<table width="100%" cellspacing="0" class="dataTable" style="border-top: 1px solid #bbdbf1;">
    <tr class="tatr1">
       <td width="20" class="firstCell"><input type="checkbox" class="checkall" /></td>
        <td>编号</td>
        <td>运单号</td>
        <td>订单编号</td>
        <td>物流跟踪信息</td>
        <td>管理备注</td>
        <td>添加时间</td>
        <td>更新时间</td>
        <td>操作</td>
    </tr>
    <?php $_from = $this->_var['wuliu']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['list']):
?>
    <tr class="tatr2">
      <td class="firstCell"><input type="checkbox" class="checkitem" value="<?php echo $this->_var['list']['wuliu_id']; ?>" /></td>
      <td class="left_style"><?php echo htmlspecialchars($this->_var['list']['wuliu_id']); ?></td>
        <td><?php if ($this->_var['list']['yundanhao']): ?><a href="index.php?app=kd_wuliu&act=edit&order_id=<?php echo $this->_var['list']['order_id']; ?>&wuliu_id=<?php echo $this->_var['list']['wuliu_id']; ?>"><?php echo htmlspecialchars($this->_var['list']['yundanhao']); ?></a><?php else: ?>没有填写快递单号<?php endif; ?></td>
        <td><?php if ($this->_var['list']['order_sn']): ?><a href="index.php?app=kd_order&key=<?php echo $this->_var['list']['order_sn']; ?>" target="_blank"><?php echo htmlspecialchars($this->_var['list']['order_sn']); ?></a><?php else: ?>没有相应订单号<?php endif; ?></td>
        <td><?php echo htmlspecialchars($this->_var['list']['yudan_text']); ?></td>
        <td><?php echo htmlspecialchars($this->_var['list']['notes']); ?></td>
        <td><?php echo local_date("Y-m-d H:i:s",$this->_var['list']['addtime']); ?></td>
        <td><?php echo local_date("Y-m-d H:i:s",$this->_var['list']['updatetime']); ?></td>
        <td><a href="index.php?app=kd_wuliu&act=edit&order_id=<?php echo $this->_var['list']['order_id']; ?>&wuliu_id=<?php echo $this->_var['list']['wuliu_id']; ?>">修改</a>&nbsp;|&nbsp;<a href="javascript:drop_confirm('删除后不可恢复，您确定要删除吗','index.php?app=kd_wuliu&act=drop&order_id=<?php echo $this->_var['list']['order_id']; ?>&id=<?php echo $this->_var['list']['wuliu_id']; ?>');">删除</a></td>
  </tr>
  <?php endforeach; else: ?>
</table>
<table width="100%" cellspacing="0" class="dataTable">
  <tr bgcolor="#FFFFFF">
    <td style="padding:8px; color:#F00; text-align:center; font-size:14px;">没有符合条件的记录</td>
  </tr>
  <?php endif; unset($_from); ?><?php $this->pop_vars();; ?>
</table>
</form>
<?php if ($this->_var['wuliu']): ?>
<div id="dataFuncs">
  <div id="batchAction" class="left paddingT15">
   &nbsp;&nbsp;&nbsp;<label><input type="checkbox" class="checkall" /> 全选</label>&nbsp;&nbsp;
  <input class="formbtn batchButton" type="button" value="删除" name="id" uri="index.php?app=kd_wuliu&act=drop" presubmit="confirm('您确定要删除它吗？');" />  
  </div>
  <div class="pageLinks"><?php echo $this->fetch('page.bottom.html'); ?></div>
<?php endif; ?>
 </div>
  <div class="clear"></div>
</div>
<?php echo $this->fetch('footer.html'); ?>